package com.orange.handler.impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.orange.dbhelp.page.Page;
import com.orange.handler.AuthExpertService;
import com.orange.modules.dao.AuthExpertRepository;
import com.orange.modules.entity.expert.AuthExpert;

@Service
public class AuthExpertServiceImpl implements AuthExpertService{

	@Autowired
	private AuthExpertRepository authExpertRepository;

	@Override
	public void insertAuthExpert(AuthExpert ae) throws SQLException {
	
		authExpertRepository.insertAuthExpert(ae);
	}

	@Override
	public Page<AuthExpert> queryAllExpert(Integer pageNumber,Integer pageSize , Map<String ,String> map) throws SQLException {

		Page<AuthExpert> list = authExpertRepository.queryAllExpert(pageNumber, pageSize, map);
		return list;
	}

	@Override
	public void deleteAuthExpert(String pid) throws SQLException {
	
		authExpertRepository.deleteAuthExpert(pid);
	}

	@Override
	public AuthExpert queryExpertByAccount(String account) throws SQLException {
	
		AuthExpert ae = authExpertRepository.queryExpertByAccount(account);
		return ae;
	}

	@Override
	public AuthExpert queryExpertBypid(String pid) throws SQLException {
		
		AuthExpert ae = authExpertRepository.queryExpertBypid(pid);
		return ae;
	}

	@Override
	public Page<AuthExpert> queryExpertByInfoPage(Map<String,String>map) throws SQLException {
		Page<AuthExpert> page = authExpertRepository.queryExpertByInfoPage(map);
		return page;
	}

	@Override
	public AuthExpert queryPassBypid(String pid) throws SQLException {
		
		return null;
	}

	@Override
	public void updateAuthExpert(AuthExpert ae) throws SQLException {
	
		authExpertRepository.updateAuthExpert(ae);
	}

	/* (non-Javadoc)
	 * @see com.orange.handler.AuthExpertService#queryAuthExpertInfoById(java.lang.String)
	 */
	@Override
	public AuthExpert queryAuthExpertInfoById(String pid) {
		AuthExpert a=authExpertRepository.queryAuthExpertInfoById(pid);
		return a;
	}

	/* (non-Javadoc)
	 * @see com.orange.handler.AuthExpertService#saveAuthExpertInfos(java.util.List)
	 */
	@Override
	public void saveAuthExpertInfos(List<AuthExpert> list) {
		authExpertRepository.saveAuthExpertInfos(list);
	}

	/* (non-Javadoc)
	 * @see com.orange.handler.AuthExpertService#queryUnAuthExpertList()
	 */
	@Override
	public List<AuthExpert> queryUnAuthExpertList() throws SQLException {
		List<AuthExpert> ls=authExpertRepository.queryUnAuthExpertList();
		return ls;
	}

	@Override
	public AuthExpert queryExpertInfoByEcodeId(String ecodeId)
			throws SQLException {
		AuthExpert ae = authExpertRepository.queryExpertInfoByEcodeId(ecodeId);
		return ae;
	}
	
	/* (non-Javadoc)
	 * @see com.orange.handler.AuthExpertService#queryUnAuthExpertList_material()
	 */
	@Override
	public List<AuthExpert> queryUnAuthExpertList_material()
			throws SQLException {
		List<AuthExpert> ls=authExpertRepository.queryUnAuthExpertList_material();
		return ls;
	}
	
}
